<%@ page language="java" contentType="text/html; charset=windows-1255"
    pageEncoding="windows-1255"%>
<%@ page import="java.io.*" %>
<%@ page isErrorPage="true" %>
<%-- 
	This JSP is our exception page. We tried to avoid getting here, and tried
	handling most of the exception... But if there's no choice.
 --%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1255"/>
<link href="css/templatemo_style.css" rel="stylesheet" type="text/css" />
<title>Exception page page</title>
</head>
<body>
<jsp:include page="header_part_1.html"/>
            <div id="templatemo_menu">
                <ul>
                    <li><a href="index.jsp">Home</a></li>
                    <li><a href="about.jsp">About Us</a></li>
<%
                    	String username = (String) session.getAttribute("username");
                        if (null != username)
                        {
%>
                            <li><a href="userPage.jsp">Your profile</a></li>
<%
                        }
%>
                    <li><a href="allCourses.jsp">Courses</a></li>
                    <li><a href="allUsers.jsp">Users</a></li>
                </ul>    	
            </div> <!-- end of templatemo_menu -->
<jsp:include page="header_part_2.html"/>
<div id="content">
<i>This is embarrassing, we've encountered an exception...</i><br/>
<i>...</i><br/>
<i>...</i><br/>
<i>...</i><br/>
<i>This shouldn't happen.</i>
<%
	if (null != exception)
	{
%>
		<i>The exception is <%= exception.getMessage() %></i>
<%
	}
	else
	{
%>
		<i>We're not sure what the exception is :(</i>
<%
	}
%>
<br/>
<b>Please contact us ASAP!</b>
</div>
<jsp:include page="sidebar.jsp"/>
<jsp:include page="footer.html"/>
</body>
</html>